import request from '@/utils/request.js'

export const _API_Login = data => request.post('/login',data) // 登陆
export const _API_GetUser = () => request.get('/user') // 获取用户信息
export const _API_AuthStudent = data => request.post('/student',data) // 认证学生
export const _API_UploadImage = data => request.uploadFile('/file', data) // 上传图片接口
export const _API_UpdateInfo = data => request.put('/user', data) // 修改用户信息
export const _API_GetTypes = () => request.get('/types') // 获取发帖的类型
export const _API_AddType = data => request.post('/type',data) // 添加类型
export const _API_GetLabels = () => request.get('/labels') // 获取发帖的标签
export const _API_GetSchools = data => request.get('/schools',data) // 获取学校
export const _API_Discusses = data => request.get('/discusses',data) // 特定条件查找话题
export const _API_AddLabel = data => request.post('/label',data) // 添加标签
export const _API_AddPost = data => request.post('/discuss',data) // 添加帖子
export const _API_GetKeywords = data => request.get('/discuss/keywords',data) // 获取热门关键字
export const _API_EchoStudent = () => request.get('/student') //学生信息显示
export const _API_AuthBusiness = data => request.post('/business',data) //商家认证
export const _API_EchoBusiness = () => request.get('/business') //商人信息显示
export const _API_EchoTeacher = () => request.get('/teacher') //教师信息显示
export const _API_AuthTeacher = data => request.post('/teacher',data) //教师认证
export const _API_EchoOfficial = data => request.post('/school/official',data) //院校官方认证
export const _API_GetOfficial = () => request.get('/school/official') //院校官方回显
export const _API_GetPostDetail = data => request.get(`/discuss/${data}`) // 帖子详情
export const _API_AddComments = data => request.post(`/comment/${data.id}`,data) //讨论区添加评论
export const _API_GetComments = data => request.get('/comment',data) //讨论区评论列表
export const _API_AddReply = data => request.post('/comment/reply',data) //添加评论回复
export const _API_GetReply = data => request.get(`/comment/reply/${data.id}`,data) //获取评论回复
export const _API_Swiper = data => request.get('/adverts',data) //广告轮播图
export const _API_DiscussLike = data => request.put(`/discuss/like/${data}`) //点赞帖子
export const _API_CommentLike = data => request.put(`/comment/like/${data}`) //点赞评论
export const _API_Collect = data => request.put('/collect',data) //收藏
export const _API_GetCollect = data => request.get('/collect',data) //收藏列表
export const _API_Reports = data => request.post('/reports',data) //举报
export const _API_Feedback = data => request.post('/feedback',data) //反馈
export const _API_Notices = data => request.get('/notices',data) //通知
export const _API_Message = data => request.get('/messages',data) //通知
export const _API_GetCity = data => request.post(`/location?location=${data}`) //获取当前地位的城市
export const _API_GetHotCity = () => request.get('/cities') //获取热门城市
export const _API_AddActivity = data => request.post('/activity',data) //添加活动
export const _API_Activities = data => request.get('/activities',data) // 特定条件查找话题
export const _API_ActivitiesCont = data => request.get(`/activity/${data}`) // 活动详情
export const _API_Participator = data => request.post('/participator',data) // 参加活动
export const _API_GetParticipator = data => request.get('/participator',data) // 参加活动成员
export const _API_DelParticipator = data => request.delete(`/participator/${data}`) // 参加活动成员
export const _API_InfoParticipator = data => request.get('/activity/info',data) // 获取活动列表
export const _API_InfoDiscuss = data => request.get('/discuss/info',data) // 获取自己的帖子
export const _API_OtherUsers = data => request.get(`/user/${data}`) // 获取自己的帖子

// export const _API_IndexUpload = data => request.uploadFile('/user/auth_share', data) // 上次文件接口
// export const _API_IndexDownload = data => request.downloadFile('https://yinchengnuo.com/static/images/0.jpg', data) // 下载文件接口
